home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / programmers / source / ham8bob / tech.doc < prev    next >
Text File  |  1978-06-29  |  2KB  |  54 lines

  1. Tech-doc for HAM8bob
  2. --------------------
  3.  
  4. This doc assumes that you are familiar with the way HAM works.
  5. The 64 solid colors in a HAM8 picture will henceforth be called 'base colors'.
  6.  
  7. How is it done then?
  8.  
  9. Simple really. First select your base colors in such a way as to minimize the
  10. maximum distance from a base color to any color in your HAM graphics.
  11. The simplest way to do this is probably to set the colors up in color cube of
  12. 2x2x2 bits. This is the way I've done it in this demo, so check the ILBMs to
  13. see what I mean.
  14. All background graphics must be drawn both in HAM8, and in the 64 base colors
  15. (see back.h8 and back.64.)
  16. The bobs are drawn in HAM8 in the following way:
  17. 1.    Each pixel in the left edge(s) of the bob must be a base color.
  18. 2.    Each bob has a 'right edge mask' that is set in the pixels that are
  19.     just right of the bob (see example below.)
  20.  
  21.     --ASDA---    --####---    ------#--
  22.     -FQWEQF_-    -######--    -------#-
  23.     POQ--LHA-    ###--###-    ---#----#
  24.     NB----WE-    ##----##-    --#-----#
  25.     EM----MA-    ##----##-    --#-----#
  26.     POD--XKL-    ###--###-    ---#----#
  27.     -ZXCMVD--    -######--    -------#-
  28.     --OSLK---    --####---    ------#--
  29.  
  30.     BOB        BOB MASK    RIGHT EDGE MASK
  31.  
  32.     As you can see, you have to make the bob one pixel less wide, to have
  33.     room for the right edge mask.
  34.  
  35. When blitting in a bob, the bob itself will look right (since each row begins
  36. with a base color.)
  37. However, ugly color fringing will be visible around the right edge of the bob.
  38. So, you now blit from the 64 color version of the background through the right
  39. edge mask. This will make the pixel to the right of the bob almost the correct
  40. color, and color fringing will be much less visible.
  41.  
  42. That's it!
  43.  
  44. Conditions for this looking good:
  45. 1.    The base colors must be well choosen.
  46. 2.    The background must use plenty of smooth fades and color changes (no
  47.     large single color areas), so that the fringes 'wear themselves out'.
  48.  
  49. Feel free to steal code/ideas! I would love to see something impressive come
  50. from this.
  51.  
  52. Johan Forsberg
  53. d92-jfo@nada.kth.se
  54.